<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var fruit = prompt('请问你要什么水果')
        switch (fruit) {
            case '西瓜':
                alert('价格是55/斤');
                break;
            case '柚子':
                alert('价格是525/斤');
                break;
            case '妘':
                alert('价格是5/斤');
                break;
            default:
                alert('没有此水果');
        }
    </script>
</head>
<body>
    
</body>
</html>